package com.hk.C;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;

@Configuration
public class MyDataSourceProfile {

    @Bean
    @Primary
    @Profile("dev")
    public MyDataSource getDevPerson(){
        return new MyDataSource("Dev");
    }


    @Bean
    @Profile("prod")
    public  MyDataSource getProdPerson(){
        return new MyDataSource("Prod");
    }






}
